<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function selectCategory(){
            console.dir(window)
            //打开新窗口
            window.open('book_categories.html', '_blank', 'width=300,height=400,left=200,top=200')
        }
    </script>
</head>
<body>
    <form action="/third" method="post">
        <div>
            <label>图书类别:</label>
            <input id="category" type="text" name="category" readonly placeholder="请选择图书类别"/>
            <button onclick="selectCategory()">选择类别</button>
        </div>

        <div>
            <label>图书名称:</label>
            <input type="text" id="title" name="title" placeholder="图书名称"/>
        </div>

        <div>
            <label>图书作者:</label>
            <input type="text" id="author" name="author" placeholder="图书作者"/>
        </div>


        <div>
            <label>图书价格:</label>
            <input type="number" id="price" min="0" name="price" placeholder="图书价格"/>
        </div>

        <div>
            <label>出版社:</label>
            <input type="text" id="publisher" name="publisher" placeholder="出版社"/>
        </div>

        <div>
            <button onclick="save()">添加图书</button>
        </div>
    </form>
</body>
</html>